package top.wlink.bzgrowup.bzex;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;

import top.wlink.bzgrowup.MainActivity;
import top.wlink.bzgrowup.R;

public class WelcomeActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        ActionBar actionbar=getSupportActionBar();
        if (actionbar != null){
            actionbar.hide();
        }
            new Handler().postDelayed(new Runnable(){
                @Override
                public void run() {
                    Intent intent = new Intent(WelcomeActivity.this, LoginActivity.class);
                    if ( UserManage.getInstance().hasUserInfo(WelcomeActivity.this) )  intent = new Intent(WelcomeActivity.this, MainActivity.class);
                    startActivity(intent);
                    finish();
                }
            }, 1500);
    }
}

/* action bar
http://blog.csdn.net/guolin_blog/article/details/18234477
 */